home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\INCLUDE\HOOK.H < prev    next >
C/C++ Source or Header  |  1994-12-29  |  4KB  |  148 lines

  1. /*
  2.  * hook.h.proto: header for hook.c
  3.  * 
  4.  * Generated from hook.h.proto by source/Makefile
  5.  *
  6.  * @(#)$Id: hook.h.proto,v 1.10 1994/10/16 01:29:14 mrg Stab $
  7.  */
  8.  
  9. #ifndef __hook_h_
  10. # define __hook_h_
  11.  
  12. /* Hook: The structure of the entries of the hook functions lists */
  13. typedef struct    hook_stru
  14. {
  15.     struct    hook_stru *next;    /* pointer to next element in list */
  16.     char    *nick;            /* The Nickname */
  17.     int    not;            /* If true, this entry should be
  18.                      * ignored when matched, otherwise it
  19.                      * is a normal entry */
  20.     int    noisy;            /* flag indicating how much output
  21.                      * should be given */
  22.     int    server;            /* the server in which this hook
  23.                      * applies. (-1 if none). If bit 0x1000
  24.                      * is set, then no other hooks are
  25.                      * tried in the given server if all the
  26.                      * server specific ones fail
  27.                      */
  28.     int    sernum;            /* The serial number for this hook. This
  29.                      * is used for hooks which will be
  30.                      * concurrent with others of the same
  31.                      * pattern. The default is 0, which
  32.                      * means, of course, no special
  33.                      * behaviour. If any 1 hook suppresses
  34.                      * the * default output, output will be
  35.                      * suppressed.
  36.                      */
  37.     char    *stuff;            /* The this that gets done */
  38.     int    global;            /* set if loaded from `global' */
  39. }    Hook;
  40.  
  41. /* HookFunc: A little structure to keep track of the various hook functions */
  42. typedef struct
  43. {
  44.     char    *name;            /* name of the function */
  45.     Hook    *list;            /* pointer to head of the list for this
  46.                      * function */
  47.     int    params;            /* number of parameters expected */
  48.     int    mark;
  49.     unsigned flags;
  50. }    HookFunc;
  51.  
  52. /*
  53.  * NumericList: a special list type to dynamically handle numeric hook
  54.  * requests 
  55.  */
  56. typedef struct numericlist_stru
  57. {
  58.     struct    numericlist_stru *next;
  59.     char    *name;
  60.     Hook    *list;
  61. }    NumericList;
  62.  
  63. #define    ACTION_LIST 0
  64. #define    CHANNEL_NICK_LIST 1
  65. #define CHANNEL_SIGNOFF_LIST 2
  66. #define CONNECT_LIST 3
  67. #define CTCP_LIST 4
  68. #define CTCP_REPLY_LIST 5
  69. #define    DCC_CHAT_LIST 6
  70. #define DCC_CONNECT_LIST 7
  71. #define DCC_ERROR_LIST 8
  72. #define DCC_LOST_LIST 9
  73. #define    DCC_RAW_LIST 10
  74. #define DCC_REQUEST_LIST 11
  75. #define DISCONNECT_LIST 12
  76. #define ENCRYPTED_NOTICE_LIST 13
  77. #define ENCRYPTED_PRIVMSG_LIST 14
  78. #define EXEC_LIST 15
  79. #define EXEC_ERRORS_LIST 16
  80. #define EXEC_EXIT_LIST 17
  81. #define EXEC_PROMPT_LIST 18
  82. #define EXIT_LIST 19
  83. #define FLOOD_LIST 20
  84. #define HELP_LIST 21
  85. #define    HOOK_LIST 22
  86. #define IDLE_LIST 23
  87. #define INPUT_LIST 24
  88. #define INVITE_LIST 25
  89. #define JOIN_LIST 26
  90. #define LEAVE_LIST 27
  91. #define LIST_LIST 28
  92. #define MAIL_LIST 29
  93. #define MODE_LIST 30
  94. #define MSG_LIST 31
  95. #define MSG_GROUP_LIST 32
  96. #define NAMES_LIST 33
  97. #define NICKNAME_LIST 34
  98. #define NOTE_LIST 35
  99. #define NOTICE_LIST 36
  100. #define NOTIFY_SIGNOFF_LIST 37
  101. #define NOTIFY_SIGNON_LIST 38
  102. #define PUBLIC_LIST 39
  103. #define PUBLIC_MSG_LIST 40
  104. #define PUBLIC_NOTICE_LIST 41
  105. #define PUBLIC_OTHER_LIST 42
  106. #define    RAW_IRC_LIST 43
  107. #define    SEND_ACTION_LIST 44
  108. #define    SEND_DCC_CHAT_LIST 45
  109. #define SEND_MSG_LIST 46
  110. #define SEND_NOTICE_LIST 47
  111. #define SEND_PUBLIC_LIST 48
  112. #define    SEND_TALK_LIST 49
  113. #define    SERVER_NOTICE_LIST 50
  114. #define SIGNOFF_LIST 51
  115. #define    TALK_LIST 52
  116. #define TIMER_LIST 53
  117. #define TOPIC_LIST 54
  118. #define WALL_LIST 55
  119. #define WALLOP_LIST 56
  120. #define WHO_LIST 57
  121. #define WIDELIST_LIST 58
  122. #define WINDOW_LIST 59
  123. #define WINDOW_KILL_LIST 60
  124. #define KICK_LIST 61
  125.  
  126. #ifdef ON_KICK
  127. # define NUMBER_OF_LISTS KICK_LIST + 1
  128. #else
  129. # define NUMBER_OF_LISTS WINDOW_KILL_LIST + 1
  130. #endif 
  131.  
  132. #ifdef USE_STDARG_H
  133. extern    int    do_hook(int, char *, ...);
  134. #else
  135. extern    int    do_hook();
  136. #endif
  137. extern    void    save_hooks();
  138. extern    char    *hook_info;
  139. extern    void    remove_hook();
  140. extern    void    show_hook();
  141.  
  142. extern    NumericList *numeric_list;
  143. extern    HookFunc FAR hook_functions[];
  144.  
  145. extern    int    in_on_who;
  146.  
  147. #endif /* __hook_h_ */
  148.